<!--头部导航栏页面-->
<template>
  <div id="sysHander">
    <header>
      <div class="header-container">
        <div class="container">
          <div class="row">
            <!-- Header Language -->
            <div class="col-xs-12 col-sm-4 col-md-6 col-lg-6 pull-left">
              <div class="dropdown block-currency-wrapper">
                <img src="/static/img/images/img.png" style="height: 35px;width: 90px">
              </div>
            </div>
            <div class="col-xs-12 col-sm-8 col-md-6 col-lg-6 pull-right hidden-xs">
              <div class="toplinks">
                <div class="links">
                  <div>
                    <p>{{ staffName }}</p>
                  </div>
                  <div class="loginOut">
                    <a @click="loginOut">
                    <span class="hidden-xs">退出账号</span></a>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </header>
  </div>
</template>

<script>
export default {
  name: "hander",
  data(){
    return{
      staffName:''
    }
  },
  methods:{
    mystaffName(){
      this.staffName = this.$store.getters.getStaff.staffName
    },loginOut(){
        this.$confirm('确定要退出登录吗?', '提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning'
        }).then(() => {
          this.$message({
            type: 'success',
            message: '退出成功!'
          });
          this.$store.commit("REMOVE_INFO");
          this.$router.push("/login")
        }).catch(() => {
          this.$message({
            type: 'info',
            message: '已取消退出'
          });
        });
      }
  },created() {
    this.mystaffName()
  }
}
</script>

<style scoped>

</style>
